echopype Tour
Contents
1. echopype Tour¶
https://github.com/OSOceanAcoustics/echopype-examples/blob/main/notebooks/
A quick tour of core echopype capabilities.
1.1. Exploring ship echosounder data from the Pacific Hake survey¶
1.1.1. Goals¶
Illustrate a common workflow for echosounder data conversion, calibration and use. This workflow leverages the standardization applied by echopype and the power, ease of use and familiarity of libraries in the scientific Python ecosystem.
Extract and visualize data with relative ease.
1.1.2. Description¶
This notebook uses EK60 echosounder data collected during the 2017 Joint U.S.-Canada Integrated Ecosystem and Pacific Hake Acoustic Trawl Survey (‘Pacific Hake Survey’) to illustrate a common workflow for data conversion, calibration and analysis using echopype and core scientific Python software packages, particularly xarray, GeoPandas and pandas.
Two days of cloud-hosted .raw data files are accessed by echopype directly from an Amazon Web Services (AWS) S3 “bucket” maintained by the NOAA NCEI Water-Column Sonar Data Archive. With echopype, each file is converted to a standardized representation based on the SONAR-netCDF4 v1.0 convention and saved to the netCDF4 files format.
Data stored in the netCDF-based SONAR-netCDF4 convention can be conveniently and intuitively manipulated with xarray in combination with related scientific Python packages. Mean Volume Backscattering Strength (MVBS) is computed with echopype from the combined, converted raw data files. The GPS location track and MVBS echograms are visualized.
1.1.3. Running the notebook¶
This notebook can be run with a conda environment created using the conda environment file https://github.com/OSOceanAcoustics/echopype-examples/blob/echopype_paper/binder/environment.yml. The notebook creates the ./exports directory, if not already present. netCDF files will be exported there.
import glob
from pathlib import Path
import fsspec
import geopandas as gpd
import xarray as xr
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.io.img_tiles as cimgt
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER
import hvplot.xarray
import echopype as ep
import warnings
warnings.simplefilter("ignore", category=DeprecationWarning)
1.2. Compile list of raw files to read from the NCEI WCSD S3 bucket¶
We’ll compile a list of several EK60 .raw files from the 2017 Pacific Hake survey, available via open, anonymous access from an AWS S3 bucket managed by the NCEI WCSD.
After using fsspec to establish an S3 “file system” access point, extract a list of .raw files in the target directory.
fs = fsspec.filesystem('s3', anon=True)
bucket = "ncei-wcsd-archive"
rawdirpath = "data/raw/Bell_M._Shimada/SH1707/EK60"
s3rawfiles = fs.glob(f"{bucket}/{rawdirpath}/*.raw")
print(f"There are {len(s3rawfiles)} raw files in the directory")
There are 4343 raw files in the directory
# print out the last two S3 raw file paths in the list
s3rawfiles[-2:]
['ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170913-T180733.raw',
'ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Winter2017-D20170615-T002629.raw']
Each of these .raw files is typically about 25 MB. To select a reasonably small but meaningful target for this demo, let’s select all files from 2017-07-28 collected over a two hour period, 18:00 to 19:59 UTC. This is done through string matching on the time stamps found in the file names.
s3rawfiles = [
s3path for s3path in s3rawfiles
if any([f"D2017{dtstr}" in s3path for dtstr in ['0728-T18', '0728-T19']])
]
print(f"There are {len(s3rawfiles)} target raw files available")
There are 5 target raw files available
s3rawfiles
['ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T181619.raw',
'ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T184131.raw',
'ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T190728.raw',
'ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T193459.raw',
'ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T195219.raw']
1.3. Read target raw files directly from AWS S3 bucket and convert to netcdf¶
Create the directory where the exported files will be saved, if this directory doesn’t already exist.
converted_dpath = Path('exports')
converted_dpath.mkdir(exist_ok=True)
EchoData is an echopype object for conveniently handling raw converted data from either raw instrument files or previously converted and standardized raw netCDF4 and Zarr files. It is essentially a container for multiple xarray.Dataset objects, each corresponds to one of the netCDF4 groups specified in the SONAR-netCDF4 convention – the convention followed by echopype. The EchoData object can be used to conveniently accesse and explore the echosounder raw data and for calibration and other processing.
For each raw file:
Access file directly from S3 via
ep.open_rawto create a convertedEchoDataobject in memoryAdd global and platform attributes to
EchoDataobjectExport to a local netCDF file
for s3rawfpath in s3rawfiles:
raw_fpath = Path(s3rawfpath)
try:
# Access file directly from S3 to create a converted EchoData object in memory
ed = ep.open_raw(
f"s3://{s3rawfpath}",
sonar_model='EK60',
storage_options={'anon': True}
)
# Manually populate additional metadata about the dataset and the platform
# -- SONAR-netCDF4 Top-level Group attributes
ed.top.attrs['title'] = "2017 Pacific Hake Acoustic Trawl Survey"
ed.top.attrs['summary'] = (
f"EK60 raw file {raw_fpath.name} from the {ed.top.attrs['title']}, "
"converted to a SONAR-netCDF4 file using echopype."
)
# -- SONAR-netCDF4 Platform Group attributes
ed.platform.attrs['platform_type'] = "Research vessel"
ed.platform.attrs['platform_name'] = "Bell M. Shimada" # A NOAA ship
ed.platform.attrs['platform_code_ICES'] = "315"
# Save to converted netCDF format
# Use the same base file name as the raw file but with a ".nc" extension
ed.to_netcdf(save_path=converted_dpath, overwrite=True)
except Exception as e:
print(f"Failed to process raw file {raw_fpath.name}: {e}")
17:19:48 parsing file Summer2017-D20170728-T181619.raw, time of first ping: 2017-Jul-28 18:16:19
17:19:51 saving exports/Summer2017-D20170728-T181619.nc
17:19:56 parsing file Summer2017-D20170728-T184131.raw, time of first ping: 2017-Jul-28 18:41:31
17:19:59 saving exports/Summer2017-D20170728-T184131.nc
17:20:04 parsing file Summer2017-D20170728-T190728.raw, time of first ping: 2017-Jul-28 19:07:28
17:20:07 saving exports/Summer2017-D20170728-T190728.nc
17:20:11 parsing file Summer2017-D20170728-T193459.raw, time of first ping: 2017-Jul-28 19:34:59
17:20:13 saving exports/Summer2017-D20170728-T193459.nc
17:20:16 parsing file Summer2017-D20170728-T195219.raw, time of first ping: 2017-Jul-28 19:52:19
17:20:19 saving exports/Summer2017-D20170728-T195219.nc
Let’s examine the last EchoData object created above, ed. This summary shows a collapsed view the netCDF4 groups that make up the EchoData object, where each group corresponds to an xarray Dataset. The backscatter data is in the Beam group, accessible as ed.beam.
ed
-
- conventions :
- CF-1.7, SONAR-netCDF4-1.0, ACDD-1.3
- keywords :
- EK60
- sonar_convention_authority :
- ICES
- sonar_convention_name :
- SONAR-netCDF4
- sonar_convention_version :
- 1.0
- summary :
- EK60 raw file Summer2017-D20170728-T195219.raw from the 2017 Pacific Hake Acoustic Trawl Survey, converted to a SONAR-netCDF4 file using echopype.
- title :
- 2017 Pacific Hake Acoustic Trawl Survey
- date_created :
- 2017-07-28T19:52:19Z
- survey_name :
<xarray.Dataset> Dimensions: () Data variables: *empty* Attributes: conventions: CF-1.7, SONAR-netCDF4-1.0, ACDD-1.3 keywords: EK60 sonar_convention_authority: ICES sonar_convention_name: SONAR-netCDF4 sonar_convention_version: 1.0 summary: EK60 raw file Summer2017-D20170728-T195219.r... title: 2017 Pacific Hake Acoustic Trawl Survey date_created: 2017-07-28T19:52:19Z survey_name:xarray.Dataset -
- frequency: 3
- ping_time: 523
- frequency(frequency)float641.8e+04 3.8e+04 1.2e+05
- units :
- Hz
- long_name :
- Transducer frequency
- valid_min :
- 0.0
array([ 18000., 38000., 120000.])
- ping_time(ping_time)datetime64[ns]2017-07-28T19:52:19.120000 ... 2...
- axis :
- T
- long_name :
- Timestamps for NMEA position datagrams
- standard_name :
- time
array(['2017-07-28T19:52:19.120000000', '2017-07-28T19:52:23.078000128', '2017-07-28T19:52:26.897999872', ..., '2017-07-28T20:25:56.434999808', '2017-07-28T20:26:00.352000000', '2017-07-28T20:26:04.278000128'], dtype='datetime64[ns]')
- absorption_indicative(frequency, ping_time)float640.002822 0.002822 ... 0.03259
- long_name :
- Indicative acoustic absorption
- units :
- dB/m
- valid_min :
- 0.0
array([[0.00282171, 0.00282171, 0.00282171, ..., 0.00282171, 0.00282171, 0.00282171], [0.00985526, 0.00985526, 0.00985526, ..., 0.00985526, 0.00985526, 0.00985526], [0.03259379, 0.03259379, 0.03259379, ..., 0.03259379, 0.03259379, 0.03259379]]) - sound_speed_indicative(frequency, ping_time)float641.481e+03 1.481e+03 ... 1.481e+03
- long_name :
- Indicative sound speed
- standard_name :
- speed_of_sound_in_sea_water
- units :
- m/s
- valid_min :
- 0.0
array([[1480.62597656, 1480.62597656, 1480.62597656, ..., 1480.62597656, 1480.62597656, 1480.62597656], [1480.62597656, 1480.62597656, 1480.62597656, ..., 1480.62597656, 1480.62597656, 1480.62597656], [1480.62597656, 1480.62597656, 1480.62597656, ..., 1480.62597656, 1480.62597656, 1480.62597656]])
<xarray.Dataset> Dimensions: (frequency: 3, ping_time: 523) Coordinates: * frequency (frequency) float64 1.8e+04 3.8e+04 1.2e+05 * ping_time (ping_time) datetime64[ns] 2017-07-28T19:52:19.12... Data variables: absorption_indicative (frequency, ping_time) float64 0.002822 ... 0.03259 sound_speed_indicative (frequency, ping_time) float64 1.481e+03 ... 1.48...xarray.Dataset -
- location_time: 2769
- frequency: 3
- ping_time: 523
- location_time(location_time)datetime64[ns]2017-07-28T19:52:22.000999936 .....
- axis :
- T
- long_name :
- Timestamps for NMEA position datagrams
- standard_name :
- time
array(['2017-07-28T19:52:22.000999936', '2017-07-28T19:52:22.159000064', '2017-07-28T19:52:23.456000000', ..., '2017-07-28T20:26:09.035999744', '2017-07-28T20:26:09.195000320', '2017-07-28T20:26:10.436999680'], dtype='datetime64[ns]') - frequency(frequency)float641.8e+04 3.8e+04 1.2e+05
- units :
- Hz
- long_name :
- Transducer frequency
- valid_min :
- 0.0
array([ 18000., 38000., 120000.])
- ping_time(ping_time)datetime64[ns]2017-07-28T19:52:19.120000 ... 2...
- axis :
- T
- long_name :
- Timestamps for position datagrams
- standard_name :
- time
array(['2017-07-28T19:52:19.120000000', '2017-07-28T19:52:23.078000128', '2017-07-28T19:52:26.897999872', ..., '2017-07-28T20:25:56.434999808', '2017-07-28T20:26:00.352000000', '2017-07-28T20:26:04.278000128'], dtype='datetime64[ns]')
- latitude(location_time)float64dask.array<chunksize=(2500,), meta=np.ndarray>
- long_name :
- Platform latitude
- standard_name :
- latitude
- units :
- degrees_north
- valid_range :
- (-90.0, 90.0)
Array Chunk Bytes 21.63 kiB 19.53 kiB Shape (2769,) (2500,) Count 2 Tasks 2 Chunks Type float64 numpy.ndarray - longitude(location_time)float64dask.array<chunksize=(2500,), meta=np.ndarray>
- long_name :
- Platform longitude
- standard_name :
- longitude
- units :
- degrees_east
- valid_range :
- (-180.0, 180.0)
Array Chunk Bytes 21.63 kiB 19.53 kiB Shape (2769,) (2500,) Count 2 Tasks 2 Chunks Type float64 numpy.ndarray - sentence_type(location_time)<U3dask.array<chunksize=(2500,), meta=np.ndarray>
Array Chunk Bytes 32.45 kiB 29.30 kiB Shape (2769,) (2500,) Count 2 Tasks 2 Chunks Type numpy.ndarray - pitch(frequency, ping_time)float64dask.array<chunksize=(3, 523), meta=np.ndarray>
- long_name :
- Platform pitch
- standard_name :
- platform_pitch_angle
- units :
- arc_degree
- valid_range :
- (-90.0, 90.0)
Array Chunk Bytes 12.26 kiB 12.26 kiB Shape (3, 523) (3, 523) Count 2 Tasks 1 Chunks Type float64 numpy.ndarray - roll(frequency, ping_time)float64dask.array<chunksize=(3, 523), meta=np.ndarray>
- long_name :
- Platform roll
- standard_name :
- platform_roll_angle
- units :
- arc_degree
- valid_range :
- (-90.0, 90.0)
Array Chunk Bytes 12.26 kiB 12.26 kiB Shape (3, 523) (3, 523) Count 2 Tasks 1 Chunks Type float64 numpy.ndarray - heave(frequency, ping_time)float64dask.array<chunksize=(3, 523), meta=np.ndarray>
- long_name :
- Platform heave
- standard_name :
- platform_heave_angle
- units :
- arc_degree
- valid_range :
- (-90.0, 90.0)
Array Chunk Bytes 12.26 kiB 12.26 kiB Shape (3, 523) (3, 523) Count 2 Tasks 1 Chunks Type float64 numpy.ndarray - water_level(frequency, ping_time)float64dask.array<chunksize=(3, 523), meta=np.ndarray>
- long_name :
- z-axis distance from the platform coordinate system origin to the sonar transducer
- units :
- m
Array Chunk Bytes 12.26 kiB 12.26 kiB Shape (3, 523) (3, 523) Count 2 Tasks 1 Chunks Type float64 numpy.ndarray
- platform_type :
- Research vessel
- platform_name :
- Bell M. Shimada
- platform_code_ICES :
- 315
<xarray.Dataset> Dimensions: (location_time: 2769, frequency: 3, ping_time: 523) Coordinates: * location_time (location_time) datetime64[ns] 2017-07-28T19:52:22.0009999... * frequency (frequency) float64 1.8e+04 3.8e+04 1.2e+05 * ping_time (ping_time) datetime64[ns] 2017-07-28T19:52:19.120000 ... ... Data variables: latitude (location_time) float64 dask.array<chunksize=(2500,), meta=np.ndarray> longitude (location_time) float64 dask.array<chunksize=(2500,), meta=np.ndarray> sentence_type (location_time) <U3 dask.array<chunksize=(2500,), meta=np.ndarray> pitch (frequency, ping_time) float64 dask.array<chunksize=(3, 523), meta=np.ndarray> roll (frequency, ping_time) float64 dask.array<chunksize=(3, 523), meta=np.ndarray> heave (frequency, ping_time) float64 dask.array<chunksize=(3, 523), meta=np.ndarray> water_level (frequency, ping_time) float64 dask.array<chunksize=(3, 523), meta=np.ndarray> Attributes: platform_type: Research vessel platform_name: Bell M. Shimada platform_code_ICES: 315xarray.Dataset -
- location_time: 29194
- location_time(location_time)datetime64[ns]2017-07-28T19:52:19.120000 ... 2...
- axis :
- T
- long_name :
- Timestamps for NMEA datagrams
- standard_name :
- time
array(['2017-07-28T19:52:19.120000000', '2017-07-28T19:52:21.857999872', '2017-07-28T19:52:21.971000320', ..., '2017-07-28T20:26:10.596000256', '2017-07-28T20:26:10.678000128', '2017-07-28T20:26:10.777999872'], dtype='datetime64[ns]')
- NMEA_datagram(location_time)<U73'$SDVLW,5063.975,N,5063.975,N' ....
- long_name :
- NMEA datagram
array(['$SDVLW,5063.975,N,5063.975,N', '$INHDT,1.7,T', '$SDVLW,5063.980,N,5063.980,N', ..., '$GPHDT,,T', '$INHDT,7.6,T', '$INHDT,7.6,T'], dtype='<U73')
- description :
- All NMEA sensor datagrams
<xarray.Dataset> Dimensions: (location_time: 29194) Coordinates: * location_time (location_time) datetime64[ns] 2017-07-28T19:52:19.120000 ... Data variables: NMEA_datagram (location_time) <U73 '$SDVLW,5063.975,N,5063.975,N' ... '$... Attributes: description: All NMEA sensor datagramsxarray.Dataset -
- conversion_software_name :
- echopype
- conversion_software_version :
- 0.5.4
- conversion_time :
- 2021-10-29T00:20:18Z
- src_filenames :
- s3://ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T195219.raw
- duplicate_ping_times :
- 0
<xarray.Dataset> Dimensions: () Data variables: *empty* Attributes: conversion_software_name: echopype conversion_software_version: 0.5.4 conversion_time: 2021-10-29T00:20:18Z src_filenames: s3://ncei-wcsd-archive/data/raw/Bell_M._Shi... duplicate_ping_times: 0xarray.Dataset -
- sonar_manufacturer :
- Simrad
- sonar_model :
- ER60
- sonar_serial_number :
- sonar_software_name :
- sonar_software_version :
- 2.4.3
- sonar_type :
- echosounder
<xarray.Dataset> Dimensions: () Data variables: *empty* Attributes: sonar_manufacturer: Simrad sonar_model: ER60 sonar_serial_number: sonar_software_name: sonar_software_version: 2.4.3 sonar_type: echosounderxarray.Dataset -
- frequency: 3
- ping_time: 523
- range_bin: 3957
- frequency(frequency)float641.8e+04 3.8e+04 1.2e+05
- units :
- Hz
- long_name :
- Transducer frequency
- valid_min :
- 0.0
array([ 18000., 38000., 120000.])
- ping_time(ping_time)datetime64[ns]2017-07-28T19:52:19.120000 ... 2...
- axis :
- T
- long_name :
- Timestamp of each ping
- standard_name :
- time
array(['2017-07-28T19:52:19.120000000', '2017-07-28T19:52:23.078000128', '2017-07-28T19:52:26.897999872', ..., '2017-07-28T20:25:56.434999808', '2017-07-28T20:26:00.352000000', '2017-07-28T20:26:04.278000128'], dtype='datetime64[ns]') - range_bin(range_bin)int640 1 2 3 4 ... 3953 3954 3955 3956
array([ 0, 1, 2, ..., 3954, 3955, 3956])
- channel_id(frequency)<U37'GPT 18 kHz 009072058c8d 1-1 ES...
array(['GPT 18 kHz 009072058c8d 1-1 ES18-11', 'GPT 38 kHz 009072058146 2-1 ES38B', 'GPT 120 kHz 00907205a6d0 4-1 ES120-7C'], dtype='<U37') - beam_type(frequency)int641 1 1
- long_name :
- type of transducer (0-single, 1-split)
array([1, 1, 1])
- beamwidth_receive_alongship(frequency)float6410.9 6.81 6.58
- long_name :
- Half power one-way receive beam width along alongship axis of beam
- units :
- arc_degree
- valid_range :
- (0.0, 360.0)
array([10.89999962, 6.80999994, 6.57999992])
- beamwidth_receive_athwartship(frequency)float6410.82 6.85 6.52
- long_name :
- Half power one-way receive beam width along athwartship axis of beam
- units :
- arc_degree
- valid_range :
- (0.0, 360.0)
array([10.81999969, 6.8499999 , 6.51999998])
- beamwidth_transmit_alongship(frequency)float6410.9 6.81 6.58
- long_name :
- Half power one-way transmit beam width along alongship axis of beam
- units :
- arc_degree
- valid_range :
- (0.0, 360.0)
array([10.89999962, 6.80999994, 6.57999992])
- beamwidth_transmit_athwartship(frequency)float6410.82 6.85 6.52
- long_name :
- Half power one-way transmit beam width along athwartship axis of beam
- units :
- arc_degree
- valid_range :
- (0.0, 360.0)
array([10.81999969, 6.8499999 , 6.51999998])
- beam_direction_x(frequency)float640.0 0.0 0.0
- long_name :
- x-component of the vector that gives the pointing direction of the beam, in sonar beam coordinate system
- units :
- 1
- valid_range :
- (-1.0, 1.0)
array([0., 0., 0.])
- beam_direction_y(frequency)float640.0 0.0 0.0
- long_name :
- y-component of the vector that gives the pointing direction of the beam, in sonar beam coordinate system
- units :
- 1
- valid_range :
- (-1.0, 1.0)
array([0., 0., 0.])
- beam_direction_z(frequency)float640.0 0.0 0.0
- long_name :
- z-component of the vector that gives the pointing direction of the beam, in sonar beam coordinate system
- units :
- 1
- valid_range :
- (-1.0, 1.0)
array([0., 0., 0.])
- angle_offset_alongship(frequency)float64-0.18 -0.08 -0.05
- long_name :
- electrical alongship angle of the transducer
array([-0.18000001, -0.08 , -0.05 ])
- angle_offset_athwartship(frequency)float640.25 0.0 0.37
- long_name :
- electrical athwartship angle of the transducer
array([0.25, 0. , 0.37])
- angle_sensitivity_alongship(frequency)float6413.89 21.97 23.12
- long_name :
- alongship sensitivity of the transducer
array([13.89000034, 21.96999931, 23.12000084])
- angle_sensitivity_athwartship(frequency)float6413.89 21.97 23.12
- long_name :
- athwartship sensitivity of the transducer
array([13.89000034, 21.96999931, 23.12000084])
- equivalent_beam_angle(frequency)float64-17.37 -21.01 -20.47
- long_name :
- Equivalent beam angle
- units :
- sr
- valid_range :
- (0.0, 12.566370614359172)
array([-17.37000084, -21.01000023, -20.46999931])
- transducer_offset_x(frequency)float640.0 0.0 0.0
- long_name :
- x-axis distance from the platform coordinate system origin to the sonar transducer
- units :
- m
array([0., 0., 0.])
- transducer_offset_y(frequency)float640.0 0.0 0.0
- long_name :
- y-axis distance from the platform coordinate system origin to the sonar transducer
- units :
- m
array([0., 0., 0.])
- transducer_offset_z(frequency)float640.0 0.0 0.0
- long_name :
- z-axis distance from the platform coordinate system origin to the sonar transducer
- units :
- m
array([0., 0., 0.])
- gain_correction(frequency)float6422.95 26.07 26.55
- long_name :
- Gain correction
- units :
- dB
array([22.95000076, 26.06999969, 26.54999924])
- gpt_software_version(frequency)<U6'070413' '070413' '070413'
array(['070413', '070413', '070413'], dtype='<U6')
- backscatter_r(frequency, ping_time, range_bin)float3215.79 26.34 26.27 ... -161.2 -160.8
- long_name :
- Backscatter power
- units :
- dB
array([[[ 15.7923155, 26.340124 , 26.269571 , ..., -144.2945 , -149.93881 , -144.5767 ], [ 15.7923155, 26.340124 , 26.269571 , ..., -169.45872 , -144.58847 , -143.45961 ], [ 15.7923155, 26.340124 , 26.269571 , ..., -141.47234 , -148.26903 , -143.03629 ], ..., [ 15.7923155, 26.340124 , 26.269571 , ..., -140.46106 , -142.07205 , -151.56154 ], [ 15.7923155, 26.340124 , 26.269571 , ..., -141.77808 , -140.9667 , -142.57768 ], [ 15.7923155, 26.340124 , 26.269571 , ..., -154.91286 , -140.81383 , -146.45815 ]], [[ 17.379778 , 26.72817 , 27.175013 , ..., -158.89915 , -160.0045 , -155.50081 ], [ 17.379778 , 26.72817 , 27.175013 , ..., -165.83696 , -155.88885 , -166.8835 ], [ 17.379778 , 26.72817 , 27.175013 , ..., -152.00839 , -148.96281 , -148.52773 ], ... [ 17.379778 , 26.72817 , 27.175013 , ..., -141.2254 , -149.40965 , -147.25775 ], [ 17.379778 , 26.72817 , 27.175013 , ..., -147.78691 , -157.053 , -170.75221 ], [ 17.379778 , 26.72817 , 27.175013 , ..., -147.55173 , -152.00839 , -160.7806 ]], [[ 12.39397 , 18.073559 , 18.050041 , ..., -165.70761 , -161.05104 , -159.66348 ], [ 12.417487 , 18.073559 , 18.050041 , ..., -162.30925 , -173.95065 , -162.10936 ], [ 12.417487 , 18.073559 , 18.050041 , ..., -160.20439 , -165.16669 , -169.24706 ], ..., [ 12.417487 , 18.073559 , 18.050041 , ..., -167.93005 , -162.34453 , -160.93346 ], [ 12.417487 , 18.073559 , 18.0618 , ..., -157.64095 , -166.70712 , -162.73257 ], [ 12.417487 , 18.073559 , 18.050041 , ..., -163.46164 , -161.2392 , -160.80411 ]]], dtype=float32) - sample_interval(frequency, ping_time)float640.000256 0.000256 ... 0.000256
- long_name :
- Interval between recorded raw data samples
- units :
- s
- valid_min :
- 0.0
array([[0.000256, 0.000256, 0.000256, ..., 0.000256, 0.000256, 0.000256], [0.000256, 0.000256, 0.000256, ..., 0.000256, 0.000256, 0.000256], [0.000256, 0.000256, 0.000256, ..., 0.000256, 0.000256, 0.000256]]) - transmit_bandwidth(frequency, ping_time)float641.574e+03 1.574e+03 ... 3.026e+03
- long_name :
- Nominal bandwidth of transmitted pulse
- units :
- Hz
- valid_min :
- 0.0
array([[1573.66552734, 1573.66552734, 1573.66552734, ..., 1573.66552734, 1573.66552734, 1573.66552734], [2425.1496582 , 2425.1496582 , 2425.1496582 , ..., 2425.1496582 , 2425.1496582 , 2425.1496582 ], [3026.39160156, 3026.39160156, 3026.39160156, ..., 3026.39160156, 3026.39160156, 3026.39160156]]) - transmit_duration_nominal(frequency, ping_time)float640.001024 0.001024 ... 0.001024
- long_name :
- Nominal bandwidth of transmitted pulse
- units :
- s
- valid_min :
- 0.0
array([[0.001024, 0.001024, 0.001024, ..., 0.001024, 0.001024, 0.001024], [0.001024, 0.001024, 0.001024, ..., 0.001024, 0.001024, 0.001024], [0.001024, 0.001024, 0.001024, ..., 0.001024, 0.001024, 0.001024]]) - transmit_power(frequency, ping_time)float642e+03 2e+03 2e+03 ... 250.0 250.0
- long_name :
- Nominal transmit power
- units :
- W
- valid_min :
- 0.0
array([[2000., 2000., 2000., ..., 2000., 2000., 2000.], [2000., 2000., 2000., ..., 2000., 2000., 2000.], [ 250., 250., 250., ..., 250., 250., 250.]]) - data_type(frequency, ping_time)float643.0 3.0 3.0 3.0 ... 3.0 3.0 3.0 3.0
- long_name :
- recorded data type (1-power only, 2-angle only 3-power and angle)
array([[3., 3., 3., ..., 3., 3., 3.], [3., 3., 3., ..., 3., 3., 3.], [3., 3., 3., ..., 3., 3., 3.]]) - count(frequency, ping_time)float643.957e+03 3.957e+03 ... 3.957e+03
- long_name :
- Number of samples
array([[3957., 3957., 3957., ..., 3957., 3957., 3957.], [3957., 3957., 3957., ..., 3957., 3957., 3957.], [3957., 3957., 3957., ..., 3957., 3957., 3957.]]) - offset(frequency, ping_time)float640.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- long_name :
- Offset of first sample
array([[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]]) - transmit_mode(frequency, ping_time)float640.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0
- long_name :
- 0 = Active, 1 = Passive, 2 = Test, -1 = Unknown
array([[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]]) - angle_athwartship(frequency, ping_time, range_bin)float64-3.0 -3.0 -4.0 ... 28.0 -30.0 19.0
- long_name :
- electrical athwartship angle
array([[[ -3., -3., -4., ..., 109., -54., -1.], [ -3., -3., -4., ..., -102., 21., 10.], [ -3., -3., -4., ..., 22., 112., 48.], ..., [ -3., -3., -4., ..., -120., -92., -97.], [ -3., -3., -4., ..., 21., -10., 24.], [ -3., -3., -4., ..., -123., -49., -90.]], [[ -1., -2., -2., ..., -62., -60., -66.], [ -1., -2., -2., ..., -118., -38., -118.], [ -1., -2., -2., ..., 41., 33., 24.], ..., [ -1., -2., -2., ..., 15., 50., 44.], [ -1., -2., -2., ..., 22., 89., -120.], [ -1., -2., -2., ..., -16., -48., -92.]], [[ -2., -3., -3., ..., -117., 62., -74.], [ -2., -3., -3., ..., -99., -121., 5.], [ -2., -3., -3., ..., -38., -37., 87.], ..., [ -2., -3., -3., ..., -36., 92., -72.], [ -2., -3., -3., ..., 30., 93., 86.], [ -2., -3., -3., ..., 28., -30., 19.]]]) - angle_alongship(frequency, ping_time, range_bin)float643.0 2.0 3.0 3.0 ... -51.0 -5.0 37.0
- long_name :
- electrical alongship angle
array([[[ 3., 2., 3., ..., 108., -91., 1.], [ 3., 2., 3., ..., 119., 81., 76.], [ 3., 2., 3., ..., -15., 10., 60.], ..., [ 3., 2., 3., ..., 72., -68., 105.], [ 3., 2., 3., ..., 11., -30., -82.], [ 3., 2., 3., ..., -99., -57., -75.]], [[ 0., 0., -1., ..., 10., 92., 58.], [ 0., 0., -1., ..., 81., -65., 102.], [ 0., 0., -1., ..., 54., 16., 23.], ..., [ 0., 0., -1., ..., 0., -13., 28.], [ 0., 0., -1., ..., 28., 77., -117.], [ 0., 0., -1., ..., -14., 16., 21.]], [[ -1., -1., -1., ..., 66., -71., 54.], [ -1., -1., -1., ..., -108., 123., -51.], [ -1., -1., -1., ..., 92., 81., -89.], ..., [ -1., -1., -1., ..., 114., 74., -50.], [ -1., -1., -1., ..., 95., -58., 50.], [ -1., -1., -1., ..., -51., -5., 37.]]])
- beam_mode :
- vertical
- conversion_equation_t :
- type_3
<xarray.Dataset> Dimensions: (frequency: 3, ping_time: 523, range_bin: 3957) Coordinates: * frequency (frequency) float64 1.8e+04 3.8e+04 1.2e+05 * ping_time (ping_time) datetime64[ns] 2017-07-28T19:... * range_bin (range_bin) int64 0 1 2 3 ... 3954 3955 3956 Data variables: (12/30) channel_id (frequency) <U37 'GPT 18 kHz 009072058c8... beam_type (frequency) int64 1 1 1 beamwidth_receive_alongship (frequency) float64 10.9 6.81 6.58 beamwidth_receive_athwartship (frequency) float64 10.82 6.85 6.52 beamwidth_transmit_alongship (frequency) float64 10.9 6.81 6.58 beamwidth_transmit_athwartship (frequency) float64 10.82 6.85 6.52 ... ... data_type (frequency, ping_time) float64 3.0 ... 3.0 count (frequency, ping_time) float64 3.957e+03 ... offset (frequency, ping_time) float64 0.0 ... 0.0 transmit_mode (frequency, ping_time) float64 0.0 ... 0.0 angle_athwartship (frequency, ping_time, range_bin) float64 ... angle_alongship (frequency, ping_time, range_bin) float64 ... Attributes: beam_mode: vertical conversion_equation_t: type_3xarray.Dataset -
- frequency: 3
- pulse_length_bin: 5
- frequency(frequency)float641.8e+04 3.8e+04 1.2e+05
- units :
- Hz
- long_name :
- Transducer frequency
- valid_min :
- 0.0
array([ 18000., 38000., 120000.])
- pulse_length_bin(pulse_length_bin)int640 1 2 3 4
array([0, 1, 2, 3, 4])
- sa_correction(frequency, pulse_length_bin)float640.0 -0.7 0.0 0.0 ... 0.0 0.0 -0.3
array([[ 0. , -0.7 , 0. , 0. , 0. ], [ 0. , 0. , -0.52, 0. , 0. ], [ 0. , 0. , 0. , 0. , -0.3 ]]) - gain_correction(frequency, pulse_length_bin)float6420.3 22.95 22.9 ... 27.0 27.0 26.55
array([[20.299999, 22.950001, 22.9 , 23. , 23. ], [24. , 26. , 26.07 , 26.5 , 26.5 ], [25.5 , 26.799999, 27. , 27. , 26.549999]]) - pulse_length(frequency, pulse_length_bin)float640.000512 0.001024 ... 0.001024
array([[5.120e-04, 1.024e-03, 2.048e-03, 4.096e-03, 8.192e-03], [2.560e-04, 5.120e-04, 1.024e-03, 2.048e-03, 4.096e-03], [6.400e-05, 1.280e-04, 2.560e-04, 5.120e-04, 1.024e-03]])
<xarray.Dataset> Dimensions: (frequency: 3, pulse_length_bin: 5) Coordinates: * frequency (frequency) float64 1.8e+04 3.8e+04 1.2e+05 * pulse_length_bin (pulse_length_bin) int64 0 1 2 3 4 Data variables: sa_correction (frequency, pulse_length_bin) float64 0.0 -0.7 ... -0.3 gain_correction (frequency, pulse_length_bin) float64 20.3 22.95 ... 26.55 pulse_length (frequency, pulse_length_bin) float64 0.000512 ... 0.00...xarray.Dataset
print(f"Number of ping times in this EchoData object: {len(ed.beam.ping_time)}")
Number of ping times in this EchoData object: 523
Assemble a list of EchoData object from the converted netCDF files. Note that by default the files are lazy-loaded and only metadata are read into memory, until more operations are executed. In this case, that’s the ep.combine_echodata function, which will combine all the data into a single EchoData object in memory.
ed_list = []
for converted_file in sorted(glob.glob(str(converted_dpath / "*.nc"))):
ed_list.append(ep.open_converted(converted_file))
combined_ed = ep.combine_echodata(ed_list)
print(f"Number of ping times in the combined EchoData object: {len(combined_ed.beam.ping_time)}")
Number of ping times in the combined EchoData object: 2379
The Provenance group now contains some helpful information about the source files, original ping times prior to reversal corrections (if any), etc.
combined_ed.provenance
<xarray.Dataset>
Dimensions: (file: 5, echodata_filename: 5, top_attr_key: 9, environment_attr_key: 0, platform_attr_key: 3, nmea_attr_key: 1, provenance_attr_key: 5, sonar_attr_key: 6, beam_attr_key: 2, vendor_attr_key: 0)
Coordinates:
* echodata_filename (echodata_filename) <U31 'Summer2017-D20170728-T181...
* top_attr_key (top_attr_key) <U26 'sonar_convention_version' ... ...
* environment_attr_key (environment_attr_key) float64
* platform_attr_key (platform_attr_key) <U18 'platform_code_ICES' ... '...
* nmea_attr_key (nmea_attr_key) <U11 'description'
* provenance_attr_key (provenance_attr_key) <U27 'conversion_software_nam...
* sonar_attr_key (sonar_attr_key) <U22 'sonar_type' ... 'sonar_softw...
* beam_attr_key (beam_attr_key) <U21 'beam_mode' 'conversion_equati...
* vendor_attr_key (vendor_attr_key) float64
Dimensions without coordinates: file
Data variables:
src_filenames (file) object exports/Summer2017-D20170728-T181619....
top_attrs (echodata_filename, top_attr_key) <U146 '1.0' ... '...
environment_attrs (echodata_filename, environment_attr_key) float64
platform_attrs (echodata_filename, platform_attr_key) <U15 '315' ....
nmea_attrs (echodata_filename, nmea_attr_key) <U25 'All NMEA s...
provenance_attrs (echodata_filename, provenance_attr_key) <U92 'echo...
sonar_attrs (echodata_filename, sonar_attr_key) <U11 'echosound...
beam_attrs (echodata_filename, beam_attr_key) <U8 'vertical' ....
vendor_attrs (echodata_filename, vendor_attr_key) float64
Attributes:
conversion_software_name: echopype
conversion_software_version: 0.5.4
conversion_time: 2021-10-29T00:20:26Z- file: 5
- echodata_filename: 5
- top_attr_key: 9
- environment_attr_key: 0
- platform_attr_key: 3
- nmea_attr_key: 1
- provenance_attr_key: 5
- sonar_attr_key: 6
- beam_attr_key: 2
- vendor_attr_key: 0
- echodata_filename(echodata_filename)<U31'Summer2017-D20170728-T181619.nc...
array(['Summer2017-D20170728-T181619.nc', 'Summer2017-D20170728-T184131.nc', 'Summer2017-D20170728-T190728.nc', 'Summer2017-D20170728-T193459.nc', 'Summer2017-D20170728-T195219.nc'], dtype='<U31') - top_attr_key(top_attr_key)<U26'sonar_convention_version' ... '...
array(['sonar_convention_version', 'sonar_convention_name', 'sonar_convention_authority', 'survey_name', 'conventions', 'keywords', 'date_created', 'summary', 'title'], dtype='<U26') - environment_attr_key(environment_attr_key)float64
array([], dtype=float64)
- platform_attr_key(platform_attr_key)<U18'platform_code_ICES' ... 'platfo...
array(['platform_code_ICES', 'platform_name', 'platform_type'], dtype='<U18')
- nmea_attr_key(nmea_attr_key)<U11'description'
array(['description'], dtype='<U11')
- provenance_attr_key(provenance_attr_key)<U27'conversion_software_name' ... '...
array(['conversion_software_name', 'duplicate_ping_times', 'conversion_time', 'src_filenames', 'conversion_software_version'], dtype='<U27') - sonar_attr_key(sonar_attr_key)<U22'sonar_type' ... 'sonar_software...
array(['sonar_type', 'sonar_serial_number', 'sonar_model', 'sonar_manufacturer', 'sonar_software_name', 'sonar_software_version'], dtype='<U22') - beam_attr_key(beam_attr_key)<U21'beam_mode' 'conversion_equation_t'
array(['beam_mode', 'conversion_equation_t'], dtype='<U21')
- vendor_attr_key(vendor_attr_key)float64
array([], dtype=float64)
- src_filenames(file)objectexports/Summer2017-D20170728-T18...
array([PosixPath('exports/Summer2017-D20170728-T181619.nc'), PosixPath('exports/Summer2017-D20170728-T184131.nc'), PosixPath('exports/Summer2017-D20170728-T190728.nc'), PosixPath('exports/Summer2017-D20170728-T193459.nc'), PosixPath('exports/Summer2017-D20170728-T195219.nc')], dtype=object) - top_attrs(echodata_filename, top_attr_key)<U146'1.0' ... '2017 Pacific Hake Aco...
array([['1.0', 'SONAR-netCDF4', 'ICES', '', 'CF-1.7, SONAR-netCDF4-1.0, ACDD-1.3', 'EK60', '2017-07-28T18:16:19Z', 'EK60 raw file Summer2017-D20170728-T181619.raw from the 2017 Pacific Hake Acoustic Trawl Survey, converted to a SONAR-netCDF4 file using echopype.', '2017 Pacific Hake Acoustic Trawl Survey'], ['1.0', 'SONAR-netCDF4', 'ICES', '', 'CF-1.7, SONAR-netCDF4-1.0, ACDD-1.3', 'EK60', '2017-07-28T18:41:31Z', 'EK60 raw file Summer2017-D20170728-T184131.raw from the 2017 Pacific Hake Acoustic Trawl Survey, converted to a SONAR-netCDF4 file using echopype.', '2017 Pacific Hake Acoustic Trawl Survey'], ['1.0', 'SONAR-netCDF4', 'ICES', '', 'CF-1.7, SONAR-netCDF4-1.0, ACDD-1.3', 'EK60', '2017-07-28T19:07:28Z', 'EK60 raw file Summer2017-D20170728-T190728.raw from the 2017 Pacific Hake Acoustic Trawl Survey, converted to a SONAR-netCDF4 file using echopype.', '2017 Pacific Hake Acoustic Trawl Survey'], ['1.0', 'SONAR-netCDF4', 'ICES', '', 'CF-1.7, SONAR-netCDF4-1.0, ACDD-1.3', 'EK60', '2017-07-28T19:34:59Z', 'EK60 raw file Summer2017-D20170728-T193459.raw from the 2017 Pacific Hake Acoustic Trawl Survey, converted to a SONAR-netCDF4 file using echopype.', '2017 Pacific Hake Acoustic Trawl Survey'], ['1.0', 'SONAR-netCDF4', 'ICES', '', 'CF-1.7, SONAR-netCDF4-1.0, ACDD-1.3', 'EK60', '2017-07-28T19:52:19Z', 'EK60 raw file Summer2017-D20170728-T195219.raw from the 2017 Pacific Hake Acoustic Trawl Survey, converted to a SONAR-netCDF4 file using echopype.', '2017 Pacific Hake Acoustic Trawl Survey']], dtype='<U146') - environment_attrs(echodata_filename, environment_attr_key)float64
array([], shape=(5, 0), dtype=float64)
- platform_attrs(echodata_filename, platform_attr_key)<U15'315' ... 'Research vessel'
array([['315', 'Bell M. Shimada', 'Research vessel'], ['315', 'Bell M. Shimada', 'Research vessel'], ['315', 'Bell M. Shimada', 'Research vessel'], ['315', 'Bell M. Shimada', 'Research vessel'], ['315', 'Bell M. Shimada', 'Research vessel']], dtype='<U15') - nmea_attrs(echodata_filename, nmea_attr_key)<U25'All NMEA sensor datagrams' ... ...
array([['All NMEA sensor datagrams'], ['All NMEA sensor datagrams'], ['All NMEA sensor datagrams'], ['All NMEA sensor datagrams'], ['All NMEA sensor datagrams']], dtype='<U25') - provenance_attrs(echodata_filename, provenance_attr_key)<U92'echopype' '0' ... '0.5.4'
array([['echopype', '0', '2021-10-29T00:19:50Z', 's3://ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T181619.raw', '0.5.4'], ['echopype', '0', '2021-10-29T00:19:58Z', 's3://ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T184131.raw', '0.5.4'], ['echopype', '0', '2021-10-29T00:20:06Z', 's3://ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T190728.raw', '0.5.4'], ['echopype', '0', '2021-10-29T00:20:13Z', 's3://ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T193459.raw', '0.5.4'], ['echopype', '0', '2021-10-29T00:20:18Z', 's3://ncei-wcsd-archive/data/raw/Bell_M._Shimada/SH1707/EK60/Summer2017-D20170728-T195219.raw', '0.5.4']], dtype='<U92') - sonar_attrs(echodata_filename, sonar_attr_key)<U11'echosounder' '' ... '' '2.4.3'
array([['echosounder', '', 'ER60', 'Simrad', '', '2.4.3'], ['echosounder', '', 'ER60', 'Simrad', '', '2.4.3'], ['echosounder', '', 'ER60', 'Simrad', '', '2.4.3'], ['echosounder', '', 'ER60', 'Simrad', '', '2.4.3'], ['echosounder', '', 'ER60', 'Simrad', '', '2.4.3']], dtype='<U11') - beam_attrs(echodata_filename, beam_attr_key)<U8'vertical' 'type_3' ... 'type_3'
array([['vertical', 'type_3'], ['vertical', 'type_3'], ['vertical', 'type_3'], ['vertical', 'type_3'], ['vertical', 'type_3']], dtype='<U8') - vendor_attrs(echodata_filename, vendor_attr_key)float64
array([], shape=(5, 0), dtype=float64)
- conversion_software_name :
- echopype
- conversion_software_version :
- 0.5.4
- conversion_time :
- 2021-10-29T00:20:26Z
1.4. Extract and plot GPS locations from Platform group¶
Extract and join the latitude and longitude variables from the Platform group in the combined_ed EchoData object. Convert to a Pandas DataFrame first, then to a GeoPandas GeoDataFrame for convenient viewing and manipulation.
gps_df = combined_ed.platform.latitude.to_dataframe().join(combined_ed.platform.longitude.to_dataframe())
gps_df.head(3)
| latitude | longitude | |
|---|---|---|
| location_time | ||
| 2017-07-28 18:16:21.475999744 | 43.657532 | -124.887015 |
| 2017-07-28 18:16:21.635000320 | 43.657500 | -124.887000 |
| 2017-07-28 18:16:22.168999936 | 43.657532 | -124.887080 |
gps_gdf = gpd.GeoDataFrame(
gps_df,
geometry=gpd.points_from_xy(gps_df['longitude'], gps_df['latitude']),
crs="epsg:4326"
)
Create a cartopy reference map from the point GeoDataFrame, to place the GPS track in its geographical context.
basemap = cimgt.OSM()
_, ax = plt.subplots(
figsize=(7, 7), subplot_kw={"projection": basemap.crs}
)
bnd = gps_gdf.geometry.bounds
ax.set_extent([bnd.minx.min() - 1, bnd.maxx.max() + 3,
bnd.miny.min() - 1, bnd.maxy.max() + 2])
ax.add_image(basemap, 7)
ax.gridlines(draw_labels=True, xformatter=LONGITUDE_FORMATTER, yformatter=LATITUDE_FORMATTER)
gps_gdf.plot(ax=ax, markersize=0.1, color='red',
transform=ccrs.PlateCarree());
1.5. Compute mean volume backscattering strength (\(\text{MVBS}\)) and plot interactive echograms using hvplot¶
echopype supports basic processing funcionalities including calibration (from raw instrument data records to volume backscattering strength, \(S_V\)), denoising, and computing mean volume backscattering strength, \(\overline{S_V}\) or \(\text{MVBS}\). The EchoData object can be passed into various calibration and preprocessing functions without having to write out any intermediate files.
We’ll calibrate the combined backscatter data to obtain \(S_V\). For EK60 data, by default the function uses environmental (sound speed and absorption) and calibration parameters stored in the data file. Users can optionally specify other parameter choices. \(S_V\) is then binned along range (depth) and ping time to generate \(\text{MVBS}\).
Sv_ds = ep.calibrate.compute_Sv(combined_ed)
MVBS_ds = ep.preprocess.compute_MVBS(
Sv_ds,
range_meter_bin=5, # in meters
ping_time_bin='20s' # in seconds
)
MVBS_ds
<xarray.Dataset>
Dimensions: (ping_time: 391, frequency: 3, range: 150)
Coordinates:
* ping_time (ping_time) datetime64[ns] 2017-07-28T18:16:00 ... 2017-07-28T...
* frequency (frequency) float64 1.8e+04 3.8e+04 1.2e+05
* range (range) float64 0.0 5.0 10.0 15.0 ... 730.0 735.0 740.0 745.0
Data variables:
Sv (frequency, ping_time, range) float64 1.503 -73.88 ... -51.14
Attributes:
binning_mode: physical units
range_meter_interval: 5m
ping_time_interval: 20s- ping_time: 391
- frequency: 3
- range: 150
- ping_time(ping_time)datetime64[ns]2017-07-28T18:16:00 ... 2017-07-...
array(['2017-07-28T18:16:00.000000000', '2017-07-28T18:16:20.000000000', '2017-07-28T18:16:40.000000000', ..., '2017-07-28T20:25:20.000000000', '2017-07-28T20:25:40.000000000', '2017-07-28T20:26:00.000000000'], dtype='datetime64[ns]') - frequency(frequency)float641.8e+04 3.8e+04 1.2e+05
- units :
- Hz
- long_name :
- Transducer frequency
- valid_min :
- 0.0
array([ 18000., 38000., 120000.])
- range(range)float640.0 5.0 10.0 ... 735.0 740.0 745.0
array([ 0., 5., 10., 15., 20., 25., 30., 35., 40., 45., 50., 55., 60., 65., 70., 75., 80., 85., 90., 95., 100., 105., 110., 115., 120., 125., 130., 135., 140., 145., 150., 155., 160., 165., 170., 175., 180., 185., 190., 195., 200., 205., 210., 215., 220., 225., 230., 235., 240., 245., 250., 255., 260., 265., 270., 275., 280., 285., 290., 295., 300., 305., 310., 315., 320., 325., 330., 335., 340., 345., 350., 355., 360., 365., 370., 375., 380., 385., 390., 395., 400., 405., 410., 415., 420., 425., 430., 435., 440., 445., 450., 455., 460., 465., 470., 475., 480., 485., 490., 495., 500., 505., 510., 515., 520., 525., 530., 535., 540., 545., 550., 555., 560., 565., 570., 575., 580., 585., 590., 595., 600., 605., 610., 615., 620., 625., 630., 635., 640., 645., 650., 655., 660., 665., 670., 675., 680., 685., 690., 695., 700., 705., 710., 715., 720., 725., 730., 735., 740., 745.])
- Sv(frequency, ping_time, range)float641.503 -73.88 ... -50.53 -51.14
- binning_mode :
- physical units
- range_meter_interval :
- 5m
- ping_time_interval :
- 20s
array([[[ 1.50256036, -73.87808574, -76.17331026, ..., -91.64405416, -87.73853441, -90.02638726], [ 1.50104249, -74.32318118, -76.30697291, ..., -90.25763569, -88.25234646, -89.40243515], [ 1.50154839, -74.20434567, -76.44383161, ..., -85.71071734, -92.03838262, -88.32705714], ..., [ 1.49855074, -72.25040778, -70.12681744, ..., -91.92017433, -89.79747352, -90.05616214], [ 1.49855074, -73.1396076 , -71.46217428, ..., -87.15636418, -90.24619666, -87.58838956], [ 1.49843418, -74.45512049, -71.25424759, ..., -90.52456506, -89.99514039, -93.08972573]], [[ 5.80981916, -72.36591594, -74.52442403, ..., -84.23152505, -92.13743275, -92.39741089], [ 5.80990015, -72.43768583, -74.38723547, ..., -87.69614899, -91.37796221, -91.35338592], [ 5.81022409, -71.5645352 , -71.84325599, ..., -90.16747694, -91.71270244, -89.39963161], ... [ 5.8099327 , -63.78118049, -61.00668174, ..., -89.67384261, -89.261753 , -90.04240341], [ 5.80993295, -65.42148226, -61.24183961, ..., -88.5746776 , -91.85480367, -90.13378331], [ 5.80981929, -64.99345607, -59.80574272, ..., -93.361294 , -93.5877383 , -89.05552491]], [[ 14.27339433, -62.95526984, -64.25105832, ..., -50.18611171, -49.22059841, -51.31035837], [ 14.27576173, -64.00764076, -63.5394323 , ..., -51.15425659, -50.26282292, -50.47111897], [ 14.27481038, -63.86651047, -64.06997881, ..., -51.82493436, -51.15268692, -50.97140849], ..., [ 14.27670152, -62.60627912, -64.63453898, ..., -51.06504617, -50.70826738, -49.98454213], [ 14.27604092, -63.16944084, -64.32429307, ..., -51.15383556, -51.52157549, -50.32152294], [ 14.27670671, -61.62098905, -63.56053577, ..., -51.31053549, -50.52808093, -51.13813741]]])
- binning_mode :
- physical units
- range_meter_interval :
- 5m
- ping_time_interval :
- 20s
The three frequencies used by the echosounder
MVBS_ds.frequency.values
array([ 18000., 38000., 120000.])
Generate an interactive plot of the three MVBS echograms, one for each frequency.
MVBS_ds["Sv"].hvplot.image(
x='ping_time', y='range',
color='Sv', rasterize=True,
cmap='jet', clim=(-80, -50),
xlabel='Time (UTC)',
ylabel='Depth (m)'
).options(width=500, invert_yaxis=True)
1.6. Package versions¶
import s3fs
print(f"echopype: {ep.__version__}, xarray: {xr.__version__}, geopandas: {gpd.__version__}, "
f"fsspec: {fsspec.__version__}, s3fs: {s3fs.__version__}")
echopype: 0.5.4, xarray: 0.19.0, geopandas: 0.10.2, fsspec: 2021.10.1, s3fs: 2021.10.1
import datetime
print(f"{datetime.datetime.utcnow()} +00:00")
2021-10-29 00:20:43.268871 +00:00